from rest_framework import serializers
from .models import *


class GangSerializer(serializers.ModelSerializer):
    class Meta:
        model = Gang
        fields = "__all__"


class StaffSerializer(serializers.ModelSerializer):
    gang = GangSerializer()
    leader = serializers.SlugRelatedField(slug_field="username", read_only=True)

    class Meta:
        model = Staff
        fields = "__all__"


class StaffSerializer1(serializers.ModelSerializer):
    class Meta:
        model = Staff
        fields = "__all__"


class BusinessSerializer(serializers.ModelSerializer):
    staff = serializers.SlugRelatedField(slug_field="username",read_only=True)

    class Meta:
        model = Business
        fields = "__all__"
